<!-- include tpl=head_lay title=$rs.title -->
<script type="text/javascript" src="{func include_js list.js}"></script>
<!-- if $project_list -->
<div class="layui-card">
	<div class="layui-card-header">{lang子项信息，请点击操作} <span class="red">{$rs.title}</span></div>
	<div class="layui-card-body">
		<ul class="project" id="project">
			<!-- loop from=$project_list key=$key value=$value -->
			<li id="project_{$value.id}" title="{$value.title}" status="{$value.status}" href="{url ctrl=list func=action id=$value.id/}">
				<div class="img"><img src="{$value.ico ? $value.ico : 'images/ico/default.png'}" /></div>
				<div class="txt" id="txt_{$value.id}">{$value.nick_title ? $value.nick_title : $value.title}</div>
			</li>
			<!-- /loop -->
		</ul>
		<div class="clear"></div>
	</div>
</div>
<!-- /if -->

<!-- if $rs.module -->
<div class="layui-card" id="search_html"{if !$keywords} style="display:none"{/if}>
	<div class="layui-card-header">{lang搜索}</div>
	<div class="layui-card-body">
		<form method="post" class="layui-form" action="{url ctrl=list func=action id=$pid/}">
		<div class="layui-form-item phpok-search">
			<div class="layui-inline">
				<label class="layui-form-label">{lang状态}</label>
				<div class="layui-input-block">
					<select name="keywords[status]">
						<option value=""></option>
						<option value="1"{if $keywords && $keywords.status==1} selected{/if}>已审核</option>
						<option value="2"{if $keywords && $keywords.status==2} selected{/if}>未审核</option>
					</select>
				</div>
			</div>
			<!-- if $rs.is_attr -->
			<div class="layui-inline">
				<label class="layui-form-label">{lang属性}</label>
				<div class="layui-input-block">
					<select name="keywords[attr]" id="search_attr">
						<option value=""></option>
						<!-- loop from=$attrlist key=$key value=$value -->
						<option value="{$key}"{if $keywords && $keywords.attr == $key} selected{/if}>{$value}</option>
						<!-- /loop -->
					</select>
				</div>
			</div>
			<!-- /if -->
			<!-- if $rs.cate && $catelist -->
			<div class="layui-inline">
				<label class="layui-form-label">{lang分类}</label>
				<div class="layui-input-block">
					<select name="keywords[cateid]">
						<option value="">{lang选择分类…}</option>
						<!-- loop from=$opt_catelist key=$key value=$value -->
						<option value="{$value.id}"{if $keywords && $keywords.cateid == $value.id} selected{/if}>{$value._space}{$value.title}</option>
						<!-- /loop -->
					</select>
				</div>
			</div>
			<!-- /if -->
			<div class="layui-inline">
				<label class="layui-form-label">{lang排序}</label>
				<div class="layui-input-block">
					<select name="keywords[orderby_search]">
						<option value="">{lang默认排序}</option>
						<option value="hits_hot"{if $keywords && $keywords.orderby_search=='hits_hot'} selected{/if}>{lang查看次数多到少}</option>
						<option value="hits_cold"{if $keywords && $keywords.orderby_search=='hits_cold'} selected{/if}>{lang查看次数少到多}</option>
						<!-- if $rs.is_biz -->
						<option value="price_high"{if $keywords && $keywords.orderby_search=='price_high'} selected{/if}>{lang价格从高到低}</option>
						<option value="price_low"{if $keywords && $keywords.orderby_search=='price_low'} selected{/if}>{lang价格从低到高}</option>
						<!-- /if -->
						<option value="sort_max"{if $keywords && $keywords.orderby_search=='sort_max'} selected{/if}>{lang排序从高到低}</option>
						<option value="sort_min"{if $keywords && $keywords.orderby_search=='sort_min'} selected{/if}>{lang排序从低到高}</option>
						<option value="dateline_max"{if $keywords && $keywords.orderby_search=='dateline_max'} selected{/if}>{lang最后发布排在前面}</option>
						<option value="dateline_min"{if $keywords && $keywords.orderby_search=='dateline_min'} selected{/if}>{lang以前发布的排在前面}</option>
						<option value="id_max"{if $keywords && $keywords.orderby_search=='id_max'} selected{/if}>{langID值从大到小}</option>
						<option value="id_min"{if $keywords && $keywords.orderby_search=='id_min'} selected{/if}>{langID值从小到大}</option>
					</select>
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">{lang开始时间}</label>
				<div class="layui-input-block">
					<input type="text" name="keywords[dateline_start]" class="layui-input" id="dateline_start"{if $keywords} value="{$keywords.dateline_start}"{/if} />
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">{lang结束时间}</label>
				<div class="layui-input-block">
					<input type="text" name="keywords[dateline_stop]" class="layui-input" id="dateline_stop"{if $keywords} value="{$keywords.dateline_stop}"{/if} />
				</div>
			</div>
			<!-- loop from=$ext_list key=$key value=$value id=$tmpid -->
			<!-- if $value.search == 1 || $value.search == 2 -->
			<div class="layui-inline">
				<label class="layui-form-label">{$value.title}</label>
				<div class="layui-input-block">
					<input type="text" name="keywords[{$value.identifier}]" class="layui-input"{if $keywords} value="{$keywords[$value.identifier]}"{/if} placeholder="{if $value.search == 1}{lang仅支持精确搜索}{else}{lang支持模糊搜索}{/if}" />
				</div>
			</div>
			<!-- /if -->
			<!-- /loop -->
			<!-- if $rs.is_tag -->
			<div class="layui-inline">
				<label class="layui-form-label">{lang标签Tag}</label>
				<div class="layui-input-block">
					<input type="text" name="keywords[tag]" class="layui-input"{if $keywords} value="{$keywords.tag}"{/if} placeholder="{lang多个标签请用逗号隔开}" />
				</div>
			</div>
			<!-- /if -->
			<!-- if $rs.is_userid -->
			<div class="layui-inline">
				<label class="layui-form-label">{lang会员}</label>
				<div class="layui-input-block">
					<input type="text" name="keywords[user]" class="layui-input"{if $keywords} value="{$keywords.user}"{/if} placeholder="{lang会员账号、手机号及Email}" />
				</div>
			</div>
			<!-- /if -->
			<div class="layui-inline">
				<label class="layui-form-label">{$rs.alias_title ? $rs.alias_title : P_Lang('主题')}</label>
				<div class="layui-input-block">
					<input type="text" name="keywords[title]" class="layui-input"{if $keywords} value="{$keywords.title}"{/if} placeholder="{lang支持模糊搜索}" />
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">ID</label>
				<div class="layui-input-block">
					<ul class="layout">
						<li class="layui-form-mid">
							<select name="keywords[_id]" lay-ignore>
								<option value="0">{lang等于} =</option>
								<option value="1">{lang大于} &gt;</option>
								<option value="2">{lang小于} &lt;</option>
							</select>
						</li>
						<li><input type="text" name="keywords[id]" value="{$keywords[id]}" /></li>
					</ul>
					
					
				</div>
			</div>
			
			<div class="layui-inline">
				<label class="layui-form-label">&nbsp;</label>
				<div class="layui-input-block">
					<input type="submit" value="{lang提交搜索}" class="layui-btn layui-btn-normal" />
					<input type="button" value="{lang取消搜索}" onclick="$.phpok.go('{url ctrl=list func=action id=$rs.id/}')" class="layui-btn layui-btn-primary" />
				</div>
			</div>
		</div>
		</form>
	</div>
</div>
<!-- /if -->

<!-- if $rs.admin_note -->
<div class="layui-card">
	<div class="layui-card-body">{$rs.admin_note}</div>
</div>
<!-- /if -->



<div class="layui-card">
	<div class="layui-card-header">
		{lang列表}
		<span id="AP_ACTION_HTML"></span>
		<div class="layui-btn-group fr">
			<!-- if $popedom.add -->
			<button class="layui-btn layui-btn-sm layui-btn-danger" onclick="$.win('{$rs.title}_{lang添加内容}','{url ctrl=list func=edit pid=$pid/}')"><span class="layui-icon">&#xe654;</span>{lang添加内容}</button>
			<!-- /if -->
			<button class="layui-btn layui-btn-sm" onclick="$.admin.hide_show('search_html')"><span class="layui-icon">&#xe615;</span>{lang搜索}</button>
			<!-- if $popedom.set || $session.admin_rs.if_system -->
			<button class="layui-btn layui-btn-sm" onclick="$.phpok_list.set({$pid})"><span class="layui-icon">&#xe642;</span>{lang编辑项目}</button>
			<!-- /if -->
		</div>
	</div>
	<!-- if $rslist -->
	<div class="layui-card-body">
		<table class="layui-table" lay-size="sm">
		<thead>
		<tr>
			<th width="20px">&nbsp;</th>
			<th width="20px">&nbsp;</th>
			<th>&nbsp;</th>
			<th>{$rs.alias_title ? $rs.alias_title : P_Lang('主题')}</th>
			<!-- if $rs.cate -->
			<th class="center">{lang主分类}</th>
			<!-- /if -->
			<!-- loop from=$layout key=$key value=$value -->
				<!-- if $key == "dateline" -->
				<th style="width:150px" class="center">{$value}</th>
				<!-- elseif $key == "hits" -->
				<th style="width:50px" class="center">{lang点击}</th>
				<!-- elseif $key == "sort" -->
				<th style="width:80px" class="center">{lang排序}</th>
				<!-- else -->
				<th class="lft">{$value}</th>
				<!-- /if -->
			<!-- /loop -->
			
			<th>&nbsp;</th>
		</tr>
		</thead>
		<!-- php:$tmp_m = 0 -->
		<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
		<!-- php:$tmp_m++ -->
		<tr id="list_{$value.id}" class="layui-tips" title="{$rs.alias_title ? $rs.alias_title : P_Lang('主题')}: {$value.title}&#10;{lang发布日期}: {func date 'Y-m-d H:i:s' $value.dateline}">
			<td class="center"><input type="checkbox" name="ids[]" id="id_{$value.id}" value="{$value.id}" /></td>
			<td><span class="status{$value.status}" id="status_{$value.id}" {if $popedom.status}onclick="$.admin_list.status({$value.id})"{else} style="cursor: default;"{/if} value="{$value.status}"></span></td>
			<td class="center">{$value.id}</td>
			<td><label for="id_{$value.id}">
				{$value.title}
				<!-- if $value.attr -->
					<!-- php:$attr = explode(",",$value['attr']) -->
					<!-- loop from=$attr key=$attr_k value=$attr_v -->
					<a href="{url ctrl=list func=action id=$pid/}&keywords[attr]={$attr_v}" class="gray">[{$attrlist[$attr_v]}]</a>
					<!-- /loop -->
				<!-- /if -->
				<!-- if $value.identifier -->
				<span class="gray i">（{$value.identifier}）</span>
				<!-- /if -->
				<!-- if $rs.is_biz -->
				<span class="red i"> {func price_format $value.price $value.currency_id}</span>
				<!-- /if -->
				<!-- if $value.hidden -->
				<span class="red i">({lang隐藏})</span>
				<!-- /if -->
				<!-- if $clist && $clist[$value.id] -->
				<div class="extcate">
					{lang分类}
					<!-- loop from=$clist[$value.id] key=$ck value=$cv -->
					<a href="{url ctrl=list func=action id=$pid/}&keywords[cateid]={$cv}" class="i">{$cateall[$cv]}</a> 
					<!-- /loop -->
				</div>
				<!-- /if -->
			</label>
			</td>
			<!-- if $rs.cate -->
			<td class="gray center">
				<!-- if $value.cate_id && is_array($value.cate_id) -->
				<a href="{url ctrl=list func=action id=$pid/}&keywords[cateid]={$value.cate_id.id}">{$value.cate_id.title}</a>
				<!-- else -->
				{lang未设分类}
				<!-- /if -->
			</td>
			<!-- /if -->
			
			<!-- loop from=$layout key=$k value=$v -->
				<!-- if $k == "dateline" -->
				<td class="center">{func date "Y-m-d H:i" $value.dateline}</td>
				<!-- elseif $k == "hits" -->
				<td class="center">{$value.hits}</td>
				<!-- elseif $k == 'sort' -->
				<td class="center"><input type="text" name="taxis" value="{$value.sort}" class="center short" tabindex="{$tmp_m}" onchange="$.phpok_list.sort(this,'{$value.id}')" /></td>
				<!-- elseif $k == "user_id" -->
				<td>{$value._user ? $value._user : '-'}</td>
				<!-- else -->
					<!-- if is_array($value[$k])  -->
						<!-- php:$c_list = $value[$k]['_admin'] -->
						<!-- if $c_list.type == 'pic' -->
						<td><img src="{$c_list.info}" width="28px" height="28px" border="0" class="hand" onclick="preview_attr('{$c_list.id}')" style="border:1px solid #dedede;padding:1px;" /></td>
						<!-- else -->
							<!-- if is_array($c_list.info) -->
							<td>{echo implode(' / ',$c_list.info)}</td>
							<!-- else -->
							<td>{$c_list.info ? $c_list.info : '-'}</td>
							<!-- /if -->
						<!-- /if -->
					<!-- else -->
					<td>{$value[$k] ? $value[$k] : '-'}</td>
					<!-- /if -->
				<!-- /if -->
			<!-- /loop -->
			<td>
				<div class="layui-btn-group">
					<!-- if $rs.is_front -->
					<input type="button" value="{lang查看}" onclick="$.phpok.open('{$sys.www_file}?id={$value.id}')" class="layui-btn layui-btn-sm layui-btn-normal" />
					<!-- /if -->
					<!-- if $popedom.modify -->
					<input type="button" value="{lang编辑}" onclick="top.$.win('{$rs.title}_{lang编辑}_#{$value.id}','{url ctrl=list func=edit id=$value.id/}')" class="layui-btn layui-btn-sm" />
					<!-- /if -->
					<!-- if $popedom.delete -->
					<input type="button" value="{lang删除}" onclick="content_del('{$value.id}')" class="layui-btn layui-btn-sm layui-btn-danger" />
					<!-- /if -->
					<!-- if $popedom.comment && ($rs.comment_status || $comments[$value.id]) -->
					<button type="button"class="layui-btn layui-btn-sm" onclick="$.admin_list.reply_it('{$value.id}')">
						{lang评论}
						<!-- if $comments[$value.id][uncheck] --><span class="layui-badge layui-bg-orange">{$comments[$value.id][uncheck]}</span><!-- /if -->
					</button>
					<!-- /if -->
					<!-- if $rs.subtopics && !$value.parent_id && $popedom.add --><input type="button" value="{lang加子主题}" onclick="$.win('{lang加子主题}_{$rs.title}','{url ctrl=list func=edit parent_id=$value.id pid=$value.project_id/}')" class="layui-btn layui-btn-sm" /><!-- /if -->
				</div>
			</td>
		</tr>
			<!-- loop from=$value.sonlist key=$kk value=$vv -->
			<!-- php:$tmp_m++ -->
			<tr id="list_{$vv.id}" class="layui-tips" title="{$rs.alias_title ? $rs.alias_title : P_Lang('主题')}: {$vv.title}&#10;{lang发布日期}: {func date 'Y-m-d H:i:s' $vv.dateline}">
				<td class="center"><input type="checkbox" name="ids[]" id="id_{$vv.id}" value="{$vv.id}" /></td>
				<td><span class="status{$vv.status}" id="status_{$vv.id}" {if $popedom.status}onclick="$.admin_list.status({$vv.id})"{else} style="cursor: default;"{/if} value="{$vv.status}"></span></td>
				<td class="center">{$vv.id}</td>
				<td><label for="id_{$vv.id}">
					&nbsp; &nbsp; ├─ <a href="{$sys.url}?id={$vv.id}" target="_blank" title="{lang前台访问}" style="{$vv.style}">{$vv.title}</a>
					<!-- if $vv.attr -->
						<!-- php:$attr = explode(",",$vv['attr']) -->
						<!-- loop from=$attr key=$attr_k value=$attr_v -->
						<a href="{url ctrl=list func=action id=$pid/}&keywords[attr]={$attr_v}" class="gray">[{$attrlist[$attr_v]}]</a>
						<!-- /loop -->
					<!-- /if -->
					<!-- if $vv.identifier -->
					<span class="gray i">（{$vv.identifier}）</span>
					<!-- /if -->
					<!-- if $rs.is_biz -->
					<span class="red i"> {func price_format $vv.price $vv.currency_id}</span>
					<!-- /if -->
					<!-- if $vv.hidden -->
					<span class="red i">(隐藏)</span>
					<!-- /if -->
					<!-- if $clist && $clist[$vv.id] -->
					<div class="extcate">
						分类：
						<!-- loop from=$clist[$vv.id] key=$ck value=$cv -->
						<a href="{url ctrl=list func=action id=$pid/}&keywords[cateid]={$cv}" class="i">{$cateall[$cv]}</a> 
						<!-- /loop -->
					</div>
					<!-- /if -->
				</label>
				</td>
				<!-- if $rs.cate -->
				<td class="gray center">
					<!-- if $vv.cate_id && is_array($vv.cate_id) -->
					<a href="{url ctrl=list func=action id=$pid/}&keywords[cateid]={$vv.cate_id.id}">{$vv.cate_id.title}</a>
					<!-- else -->
					{lang未设分类}
					<!-- /if -->
				<!-- /if -->
				<!-- loop from=$layout key=$k value=$v -->
					<!-- if $k == "dateline" -->
					<td class="center">{echo date("Y-m-d H:i",$vv[dateline])}</td>
					<!-- elseif $k == "hits" -->
					<td class="center">{$vv.hits}</td>
					<!-- elseif $k == 'sort' -->
					<td class="center"><input type="text" name="taxis" value="{$vv.sort}" class="center short" tabindex="{$tmp_m}" onchange="$.phpok_list.sort(this,'{$vv.id}')" /></td>
					<!-- elseif $k == 'user_id' -->
					<td>{$vv._user ? $vv._user : '-'}</td>
					<!-- else -->
						<!-- if is_array($vv[$k])  -->
							<!-- php:$c_list = $vv[$k]['_admin'] -->
							<!-- if $c_list.type == 'pic' -->
							<td><img src="{$c_list.info}" width="28px" height="28px" border="0" class="hand" onclick="preview_attr('{$c_list.id}')" style="border:1px solid #dedede;padding:1px;" /></td>
							<!-- else -->
								<!-- if is_array($c_list.info) -->
								<td>{echo implode(' / ',$c_list.info)}</td>
								<!-- else -->
								<td>{$c_list.info ? $c_list.info : '-'}</td>
								<!-- /if -->
							<!-- /if -->
						<!-- else -->
						<td>{$vv[$k] ? $vv[$k] : '-'}</td>
						<!-- /if -->
					<!-- /if -->
				<!-- /loop -->
				<td>
					<div class="layui-btn-group">
						<!-- if $rs.is_front -->
						<input type="button" value="{lang查看}" onclick="$.phpok.open('{$sys.www_file}?id={$vv.id}')" class="layui-btn layui-btn-sm layui-btn-normal" />
						<!-- /if -->
						<!-- if $popedom.modify --><input type="button" value="{lang编辑}" onclick="top.$.win('{$rs.title}_{lang编辑}_#{$vv.id}','{url ctrl=list func=edit id=$vv.id/}')" class="layui-btn layui-btn-sm" /><!-- /if -->
						<!-- if $popedom.delete --><input type="button" value="{lang删除}" onclick="content_del('{$vv.id}')" class="layui-btn layui-btn-sm layui-btn-danger" /><!-- /if -->
						<!-- if $popedom.comment && ($rs.comment_status || $comments[$vv.id]) -->
						<button type="button"class="layui-btn layui-btn-sm" onclick="$.admin_list.reply_it('{$vv.id}')">
							{lang评论}
							<!-- if $comments[$vv.id][uncheck] --><span class="layui-badge layui-bg-orange">{$comments[$vv.id][uncheck]}</span><!-- /if -->
						</button>
						<!-- /if -->
					</div>
				</td>
			</tr>
			<!-- /loop -->
		<!-- /loop -->
		</table>
		<ul class="layout">
			<li>
				<div class="layui-btn-group">
					<input type="button" value="{lang全选}" class="layui-btn layui-btn-primary layui-btn-sm" onclick="$.input.checkbox_all()" />
					<input type="button" value="{lang全不选}" class="layui-btn layui-btn-primary layui-btn-sm" onclick="$.input.checkbox_none()" />
					<input type="button" value="{lang反选}" class="layui-btn layui-btn-primary layui-btn-sm" onclick="$.input.checkbox_anti()" />
				</div>
			</li>
			<li><select id="list_action_val" onchange="update_select()">
				<option value="">{lang选择要执行的动作…}</option>
				<!-- if $opt_catelist -->
				<optgroup label="{lang分类操作}">
					<!-- loop from=$opt_catelist key=$key value=$value -->
					<option value="cate:{$value.id}">{$value._space}{$value.title}</option>
					<!-- /loop -->
				</optgroup>
				<!-- /if -->
				<!-- if $rs.is_attr -->
				<optgroup label="{$rs.alias_title ? $rs.alias_title : P_Lang('主题')}{lang属性}">
					<!-- loop from=$attrlist key=$key value=$value -->
					<option value="attr:{$key}">{$value} {$key}</option>
					<!-- /loop -->
				</optgroup>
				<!-- /if -->
				<optgroup label="其他">
					<!-- if $popedom.status -->
					<option value="status">{lang审核}</option>
					<option value="unstatus">{lang取消审核}</option>
					<!-- /if -->
					<option value="hidden">{lang隐藏}</option>
					<option value="show">{lang显示}</option>
					<!-- if $popedom.delete -->
					<option value="delete">{lang删除}</option>
					<!-- /if -->
					<!-- if $popedom.modify && $rs.subtopics -->
					<option value="set_parent">{lang绑定父层}</option>
					<option value="unset_parent">{lang取消父层}</option>
					<!-- /if -->
				</optgroup>
				</select></li>
			<li id="attr_set_li" class="hide">
				<select name="attr_set_val" style="margin-top:0px;" id="attr_set_val">
					<option value="add">{lang添加}</option>
					<option value="delete">{lang移除}</option>
				</select>
			</li>
			<!-- if $opt_catelist -->
			<li id="cate_set_li" class="hide">
				<select name="cate_set_val" style="margin-top:0px;" id="cate_set_val">
					<!-- if $rs.cate_multiple -->
					<option value="add">{lang添加扩展分类}</option>
					<option value="delete">{lang移除分类绑定}</option>
					<!-- /if -->
					<option value="move">{lang移动主分类}</option>
				</select>
			</li>
			<!-- /if -->
			<li id="plugin_button"><input type="button" value="{lang执行操作}" onclick="list_action_exec()" class="layui-btn layui-btn-sm" /></li>
		</ul>
		<div class="center"><!-- include tpl=pagelist --></div>		
	</div>
	<!-- /if -->
</div>
<!-- include tpl=foot_lay -->
